package com.yumeko.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @program: First_Generation_Cloud
 * @description:
 * @author: Zheng Hao
 * @create: 2020-04-21 17:40
 */
// name：调⽤的服务名称，和服务提供者yml⽂件中spring.application.name保持⼀致
@FeignClient(value = "service-resume", fallback = ResumeFallback.class, path = "/resume")
// 使⽤fallback的时候，类上的@RequestMapping的url前缀限定，改成配置在@FeignClient的path属性中
//@RequestMapping("/resume")
public interface ResumeFeignClient {
    @GetMapping(value = "/openstate1/{userId}")
    public String findResumeOpenState(@PathVariable(value = "userId") Long userId);
}
